<?php
class Error_ErrorController extends Myh_Controller_Action
{
	public function init()
	{
		$templatePath = APP_PATH . '/design/frontend/default/template';
		$this->loadTemplate($templatePath);
	}
	public function errorAction()
	{
		$this->view->title = 'Lỗi!. Không tìm thấy nội dung.';
		$this->view->headTitle($this->view->title, true);
		
		$errors = $this->_getParam('error_handler');
		
        switch ($errors->type) {
            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
                // 404 error -- controller or action not found
                $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');
				$content = '';
                break;
            default:
                // application error
                $content = '';
                break;
        }
 
        $this->view->content = $content;
    
	}
}